<?php

define('_MAGIC_TYPE_INVOCATION_', 0);
define('_MAGIC_TYPE_RESURECTION_', 1);
define('_MAGIC_TYPE_LIFE_', 2);
define('_MAGIC_TYPE_ATTACK_', 3);
define('_MAGIC_TYPE_DEFENSE_', 4);
define('_MAGIC_TYPE_REGIONAL_DEFENSE_', 5);

define('_MAGIC_ORIENTATION_BONUS_', 10);
define('_MAGIC_ORIENTATION_MALUS_', 11);

define('_MAGIC_TARGET_STACK_', 20); //DEFAULT
define('_MAGIC_TARGET_HERO_', 21);
define('_MAGIC_TARGET_ALL_', 22);

define('_MAGIC_BONUS_INFANTRY_', 30);
define('_MAGIC_BONUS_CAVALRY_', 31);
define('_MAGIC_BONUS_ARCHERY_', 32);
define('_MAGIC_MALUS_INFANTRY_', 33);
define('_MAGIC_MALUS_CAVALRY_', 34);
define('_MAGIC_MALUS_ARCHERY_', 35);

define('_MAGIC_DURATION_TEMPORARY_', 40);

define('_MAGIC_VALUE_TYPE_FIXED_', 50);
define('_MAGIC_VALUE_TYPE_RATIO_', 51);
define('_MAGIC_VALUE_TYPE_EACH_', 52);




$_MAGIC_LIST = array(
    array("", NULL, NULL, NULL),

    array("Summoning", "1", "Wasp Swarm", "A cavalry stack is summoned. Its power is 110 points per magic point",
        array(_MAGIC_TYPE_INVOCATION_, _MAGIC_BONUS_CAVALRY_, _MAGIC_VALUE_TYPE_FIXED_), 110, "Wasp"),
    array("Summoning", "1", "Fist of Wrath", "Causes 0,45 points damages per magic points on each member of the enemy stack during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_EACH_), 0.45),
    array("Summoning", "2", "Raise Dead", "0,25% of the stack per magic point is resurrected at the end of the round if at least one stack member is still alive at the end of the round. The stack disappears at the end of the battle",
        array(_MAGIC_TYPE_RESURECTION_, _MAGIC_VALUE_TYPE_RATIO_), 0.25),
    array("Summoning", "2", "Fire Trap", "The enemy stack loses 0,25% of its total power per magic point during the targeted round. 50% less effective against shooters",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_RATIO_, _MAGIC_MALUS_ARCHERY_), 0.25),
    array("Summoning", "3", "Phantom Forces", "A shooter stack is summoned. Its power is 130 points per magic point",
        array(_MAGIC_TYPE_INVOCATION_, _MAGIC_BONUS_ARCHERY_, _MAGIC_VALUE_TYPE_FIXED_), 130, "Phantom"),
    array("Summoning", "3", "Earthquake", "The efficiency of the city or region defenses is reduced by 0,5% per magic point during the rest of the battle",
        array(_MAGIC_TYPE_REGIONAL_DEFENSE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_RATIO_), 0.5),
    array("Summoning", "4", "Summon Elementas", "A infantry stack is summoned. Its power is 150 points per magic point",
        array(_MAGIC_TYPE_INVOCATION_, _MAGIC_BONUS_INFANTRY_, _MAGIC_VALUE_TYPE_FIXED_), 150, "Elementa"),
    array("Summoning", "4", "Firewall", "Causes 1,35 damage points per magic point on each member of the targeted stack",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_EACH_), 1.35),
    array("Summoning", "5", "Conjure Phoenix", "A cavalry stack is summoned. It's power is 0,20% points per magic point of the enemy army power",
        array(_MAGIC_TYPE_INVOCATION_, _MAGIC_BONUS_CAVALRY_, _MAGIC_VALUE_TYPE_RATIO_), 0.2, "Phoenix"),

    array("Dark", "1", "Weakness", "Reduces the enemy hero attack characteristic by 0,35 points per magic point",
        array(_MAGIC_TYPE_ATTACK_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_FIXED_, _MAGIC_TARGET_HERO_), 0.35),
    array("Dark", "1", "Sickness", "All members of all enemy remaining stacks lose 0,5 hit points per magic point",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_EACH_, _MAGIC_TARGET_ALL_), 0.5),
    array("Dark", "2", "Guard Break", "Reduces the enemy hero defense characteristic by 0,17 points per magic point",
        array(_MAGIC_TYPE_DEFENSE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_FIXED_, _MAGIC_TARGET_HERO_), 0.17),
    array("Dark", "2", "Disease", "All members of all enemy remaining stacks lose 0,7 hit points per magic point",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_EACH_, _MAGIC_TARGET_ALL_), 0.7),
    array("Dark", "3", "Vulnerability", "Reduces the enemy hero defense characteristic by 0,35 points per magic point",
        array(_MAGIC_TYPE_DEFENSE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_FIXED_, _MAGIC_TARGET_HERO_), 0.35),
    array("Dark", "3", "Slow", "Reduces the enemy hero attack characteristic by 0,5 points per magic point",
        array(_MAGIC_TYPE_ATTACK_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_FIXED_, _MAGIC_TARGET_HERO_), 0.5),
    array("Dark", "4", "Plague", "All members of all enemy remaining stacks lose 0,9 hit points per magic point",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_EACH_, _MAGIC_TARGET_ALL_), 0.9),
    array("Dark", "4", "Death Touch", "Reduces the enemy hero attack characteristics by 0,6 points per magic point",
        array(_MAGIC_TYPE_ATTACK_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_FIXED_, _MAGIC_TARGET_HERO_), 0.6),
    array("Dark", "5", "Word of Death", "All enemy stacks suffer 0,15% losses per magic point",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_VALUE_TYPE_RATIO_, _MAGIC_TARGET_ALL_), 0.15),

    array("Destructive", "1", "Stone Spikes", "Causes 0,6 damage per magic point on each member of the enemy stack during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_EACH_), 0.6),
    array("Destructive", "1", "Eldritch Arrow", "Causes 100 damage per magic point on the enemy stack during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_FIXED_), 100),
    array("Destructive", "2", "Ice Bolt", "The enemy stack loses 0,25% of its total power per magic point during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_RATIO_), 0.25),
    array("Destructive", "2", "Lightning Bolt", "Causes 0,9 damage per magic point on each member of the enemy stack during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_EACH_), 0.9),
    array("Destructive", "3", "Circle of Winter", "Causes 1,2 damage per magic point on each member of the enemy stack during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_EACH_), 1.2),
    array("Destructive", "3", "Fireball", "The enemy stack loses 0,35% of its total power per magic point during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_RATIO_), 0.35),
    array("Destructive", "4", "Meteor Shower", "Causes 1,7 damage per magic point on each member of the enemy stack during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_EACH_), 1.7),
    array("Destructive", "4", "Chain Lightning", "Causes 150 damage per magic point on the enemy stack during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_FIXED_), 150),
    array("Destructive", "5", "Implosion", "The enemy stack loses 0,60% of its total power per magic point during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_RATIO_), 0.6),

    array("Light", "1", "Divine Strength", "Increases the attack value of all the members of the stack by 0,2 points per magic points during the targeted round",
        array(_MAGIC_TYPE_ATTACK_, _MAGIC_ORIENTATION_BONUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_EACH_, _MAGIC_DURATION_TEMPORARY_), 0.2),
    array("Light", "1", "Bless", "Increases the defensive value of the entire stack by 0,35% per magic point during the targeted round",
        array(_MAGIC_TYPE_DEFENSE_, _MAGIC_ORIENTATION_BONUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_RATIO_, _MAGIC_DURATION_TEMPORARY_), 0.35),
    array("Light", "2", "Haste", "Increase the Attack Value of the entire stack by 0,30% per magic point during the targeted round",
        array(_MAGIC_TYPE_ATTACK_, _MAGIC_ORIENTATION_BONUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_RATIO_, _MAGIC_DURATION_TEMPORARY_), 0.3),
    array("Light", "2", "Mystic Shield", "Increases the Defense Value of all the members of the stack by 0,4 per magic point. 50% more efficient if it affects a cavalry stack",
        array(_MAGIC_TYPE_DEFENSE_, _MAGIC_ORIENTATION_BONUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_EACH_, _MAGIC_BONUS_CAVALRY_), 0.4),
    array("Light", "3", "Deflect Missiles", "Increase the Defensive value of the entire stack by 0,45% per magic point on the targeted round. Is 50% more effective if the targeted stack is a Shooter",
        array(_MAGIC_TYPE_DEFENSE_, _MAGIC_ORIENTATION_BONUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_RATIO_, _MAGIC_DURATION_TEMPORARY_, _MAGIC_BONUS_ARCHERY_), 0.45),
    array("Light", "3", "Righteous Might", "Increases the attack value of all the members of the stack by 0,4 points per magic points during the targeted round",
        array(_MAGIC_TYPE_ATTACK_, _MAGIC_ORIENTATION_BONUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_EACH_, _MAGIC_DURATION_TEMPORARY_), 0.4),
    array("Light", "4", "Word of Light", "Causes 110 Damages points per magic point on enemy stack during the targeted round",
        array(_MAGIC_TYPE_LIFE_, _MAGIC_ORIENTATION_MALUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_FIXED_), 110),
    array("Light", "4", "Teleportation", "Increases the attack value of the entire stack by 0,40% per magic point during the targeted round. 50% less efficient if it affects a shooter stack",
        array(_MAGIC_TYPE_ATTACK_, _MAGIC_ORIENTATION_BONUS_, _MAGIC_TARGET_STACK_, _MAGIC_VALUE_TYPE_RATIO_, _MAGIC_MALUS_ARCHERY_), 0.4),
    array("Light", "5", "Resurrection", "0,25% of the stack per magic point is resurrected at the end of the round if at least one stack member is still alive at the end of the round",
        array(_MAGIC_TYPE_RESURECTION_, _MAGIC_VALUE_TYPE_RATIO_), 0.25)
);
?>
